@import (reference) "../_mixins-wln.less";

@media (max-width: 991px) {
  .header {
    position: relative;
    z-index: 0;
    height: 44px;
    .logo {
      float: none;
      height: 44px;
      text-align: center;
      display: inline-block;
      position: absolute;
      left: 50%;
      top: 0;
      margin-left: -59px;
      img {
        padding-top: 9px;
        height: 26px;
        padding-bottom:9px;
      }
    }
    .user-login {
      color: #fff;
      text-align: right;
      font-size: 14px;
      padding-top: 8px;
      height: 30px;
      line-height: 30px;
      .user-name {
        display: inline-block;
        max-width: 5em;
      }
      .user-exit-icon {
        float: right;
        margin-left: 10px;
      }
      i.iconfont {
        float: right;
        padding-left: 8px;
        font-size: 18px;
        font-weight: 100;
      }
      a {
        color: #fff;
        &:hover {
          opacity: .8;
          filter: alpha(opacity=80);
        }
      }
    }
  }

  .header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 640px;
    height: 100vh;
    background-color: @primary-darken;
    padding: 60px 0 30px;
    margin: 0 -10px;
    float: none;
    li {
      float: none;
      &.currentPage{
        a{
          background:none;
        }
      }
      a {
        display: block;
        height: 50px;
        line-height: 50px;
        color: #fff;
        font-size: 14px;
        text-align: center;
        .transition(transform .3s ~"," opacity .3s ~"," background-color .3s);
        padding: 0 5px;
        border-bottom: 1px solid #1e7296;
        margin: 0 15px;
        &:hover {
          background-color: @primary-darken;
        }
      }
    }
  }

  /*动画*/
  /*hidden*/
  .header-nav {
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    .transition(opacity .35s ~"," transform .35s ~"," visibility .35s);
    .translate(-200px, 0);
    li {
      opacity: 1;
      visibility: visible;
      .translate(-50px, 0);
      .transition(opacity .3s ~"," transform .3s ~"," visibility .3s);
      transition-delay: .03s;
    }
  }

  .mask-layer {
    opacity: 0;
    visibility: hidden;
    .transition(opacity .3s ~"," visibility .3s);
  }

  /*show*/
  body.open-nav {
    overflow: hidden;
    .header-nav {
      opacity: 1;
      visibility: visible;
      .translate(0, 0);
      li {
        opacity: 1;
        visibility: visible;
        .translate(0, 0);
      }
    }
    .mask-layer {
      opacity: 1;
      visibility: visible;
    }
  }

  /*导航遮罩*/
  .mask-layer {
    display: block;
    background: rgba(0, 0, 0, 0.75);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    -webkit-animation-name: fade-in;
    animation-name: fade-in;
    -webkit-animation-duration: 430ms;
    animation-duration: 430ms;
    -webkit-animation-timing-function: linear;
    animation-timing-function: linear;
    -webkit-animation-direction: normal;
    animation-direction: normal;
    -webkit-animation-delay: 0s;
    animation-delay: 0s;
  }

  .nav-toggle {
    display: block;
  }
}